package com.hspedu.poly.PolyObject_.detail_;

public class PolyDetail03 {
    public static void main(String[] args) {
       BB bb = new BB();
//        System.out.println(bb instanceof BB);
//        System.out.println(bb instanceof AA);

        Object obj = new Object();
//        System.out.println(obj instanceof  AA);
//        String str = "hello";
//        System.out.println(str instanceof  Object);
//        System.out.println();

//        AA aa1 = new AA();
        AA aa = new BB();
//        BB bb2 = (BB) aa2;
        System.out.println(aa instanceof AA);
        System.out.println(aa instanceof BB);
    }

}

class AA{}
class BB extends AA{}
